@echo off
REM Make the various zip files for building NARS2000.

if "%NARSROOT%" == "" (echo *** No NARSROOT environment variable defined
                       exit /b 1)
if "%MPIR_DIR%" == "" (echo *** No MPIR_DIR environment variable defined
                       exit /b 1)
if "%MPFR_DIR%" == "" (echo *** No MPFR_DIR environment variable defined
                       exit /b 1)
if "%ECM_DIR%"  == "" (echo *** No ECM_DIR  environment variable defined
                       exit /b 1)
if "%GSL_DIR%"  == "" (echo *** No GSL_DIR  environment variable defined
                       exit /b 1)
if  %ZIPPRG%    == "" (echo *** No ZIPPRG   environment variable defined
                       exit /b 1)

if exist mplibs.zip del mplibs.zip

pushd %MPIR_DIR%..
%ZIPPRG% a %NARSROOT%mplibs.zip mpir\include\ mpir\lib\
popd

pushd %MPFR_DIR%..
%ZIPPRG% a %NARSROOT%mplibs.zip mpfr\include\ mpfr\lib\
popd

pushd %ECM_DIR%..
%ZIPPRG% a %NARSROOT%mplibs.zip ecm\include\ ecm\lib\
popd

if exist gsldir.zip del gsldir.zip

pushd %GSL_DIR%..
%ZIPPRG% a %NARSROOT%gsldir.zip gsl\
popd

if exist misc.zip del misc.zip

%ZIPPRG% a %NARSROOT%misc.zip makedep.php makepro.php SImPL-Medium.ttf

if exist qdebug.zip del qdebug.zip

%ZIPPRG% a %NARSROOT%qdebug.zip qdebug\

